arr = [1,2,3,4,5,6,7,8,9,10]
arr2 = arr[0:-1]

# 过滤数组
filter_res = [item for item in arr if item % 2 == 0 and item >5]
print("filter_res",filter_res)


arr3 = [1,2,3,4,5]
# 这么写不行,只有在 numpy中可以这么写

# arr3_filter = arr3 % 2 == 0
# print("arr3_filter",arr3_filter)


arr4 = ['orange','apple','peach','banana','kiwi']
arr4_filter = [item for item in arr4 if item != 'orange']
print("arr4_filter",arr4_filter)

# 包含 a 的
arr4_filter2 = [item for item in arr4 if 'a' in item]

print("arr4_filter2",arr4_filter2)
